import com.md.config.SpringConfig;
import com.md.entity.Blog;
import com.md.service.BlogService;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class test {
    @Test
    public void t1(){
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        BlogService service = context.getBean(BlogService.class);
        List<Blog> list = service.selectAll();
        System.out.println("list"+list);

    }
}
